﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Phone_Client.Commands_Utils;

namespace Phone_Client.ViewModels
{
    public class GoBackMarkVM : IViewModelBase
    {
        #region Fields

        private String _previouspagename;
        private ICommand _previouspagecmd;
        private Visibility _myvisibility;

        #endregion

        #region Properties

        public String PreviousPageName 
        {
            get { return _previouspagename;}
            set
            {
                if (_previouspagename == value) return;
                _previouspagename = value;
                RaisePropertyChanged("PreviousPageName");
            }
        }

        public Visibility MyVisibility
        {
            get { return _myvisibility; }
            set
            {
                if (_myvisibility == value) return;
                _myvisibility = value;
                RaisePropertyChanged("MyVisibility");
            }
        }

        #endregion

        #region Commands

        private ICommand PreviousPageCmd
        {
            get { return _previouspagecmd; }
        }

        #endregion

        #region Commands Functions

        public void PreviousPageFunc()
        {
        }

        #endregion

        #region Functions

        #endregion

        #region Ctor

        public GoBackMarkVM(String previouspagename, Visibility visibility)
        {
            if (!String.IsNullOrWhiteSpace(previouspagename))
            {
                _previouspagename = previouspagename;
                _previouspagecmd = new RelayCommand(PreviousPageFunc) { IsEnabled = true };
                _myvisibility = visibility;
            }
        }

        #endregion
    }
}
